# librsapplication
set(
    RSAPPLICATION_CPP_SRCS
    Application.cpp
    Input.cpp
    Window.cpp
)

set(
    RSAPPLICATION_MM_SRCS
    cocoa/CocoaApplication.mm
    cocoa/CocoaGraphicsContext.mm
    cocoa/CocoaWindow.mm
    cocoa/RSResponder.mm
)

set_source_files_properties(
    ${RSAPPLICATION_MM_SRCS}
    PROPERTIES COMPILE_FLAGS "-x objective-c++"
)
add_library(rsapplication ${RSAPPLICATION_MM_SRCS} ${RSAPPLICATION_CPP_SRCS})
add_dependencies(rsapplication rsgraphics rsreflection rsmath rs)
if (APPLE)
	find_library(COCOA_LIBRARY Cocoa)
	find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices)
	target_link_libraries(rsapplication ${COCOA_LIBRARY} ${APPLICATIONSERVICES_LIBRARY})
	add_dependencies(rsapplication rsgraphicsopengl)
endif (APPLE)



